const sequelize = require('sequelize')
const db = require('@/database')

const Comment = db.define('comment', {
    id: {
        type: sequelize.INTEGER,
        primaryKey: true,//主键
        autoIncrement: true,//自动增长
        allowNull: false,//不允许为空
        field: 'id',
        comment: '评论id'
    },
    movie_id: {
        type: sequelize.INTEGER,
        allowNull: false,
        field: 'move_id',
        comment: '电影id'
    },
    content: {
        type: sequelize.STRING,
        allowNull: false,
        field: 'content',
        comment: '评论内容'
    }
}, { timestamps: true, updatedAt: false })
module.exports = Comment
